Facebook Query Language

Facebook Query Language (FQL) is a query language that allows querying Facebook user data by using a SQL-style interface and without using the API.[1]

The beauty in FQL is the ability to query any Facebook data just like from an SQL database. In the following query, we pull four different types of data from a single table (status) where the user is me. When trying to do this yourself, you need to log into Facebook from your application and you also probably need to grant access to whatever data you want to pull. Due to the growing number of privacy concerns for social networks, most people have disabled most data to be shown to anyone thus your application will not be able to see it. However, once you login and grant access, you can see all data that you grant access to.

SELECT status_id,message,time,source FROM `status` WHERE uid = me()

Once data is returned from an FQL query, it is found in JSON format by default. With JSON, it can be broken down and manipulated on a web page.

References

  1. ^ "Facebook Query Language (FQL)". Documentation. Facebook. http://developers.facebook.com/docs/reference/fql/. Retrieved 2010-12-16.